package com.strive.common.model.base;

import lombok.Data;

/**
 * @description:
 * @author: bingcun.chen
 * @Date: 2022/3/2 15:04
 * @Version 1.0
 */
@Data
public class RequestModel {
    private String requestId;
    private static final ThreadLocal<RequestModel> REQUEST_MODEL = new ThreadLocal<>();
    public static RequestModel getRequestModel() {
        return REQUEST_MODEL.get();
    }
    public synchronized static void setRequestModel(RequestModel requestModel) {
        REQUEST_MODEL.set(requestModel);
    }

    public synchronized static void removeRequestModel(){
        REQUEST_MODEL.remove();
    }

}
